<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:138:"E:\xampp-windows-x64-5.6.40-1-VC11-installerroot\rootdir\htdocs\protects\www.opendemo.devp\public/../application/man\view\domain\list.html";i:1545464841;s:123:"E:\xampp-windows-x64-5.6.40-1-VC11-installerroot\rootdir\htdocs\protects\www.opendemo.devp\application\man\view\layout.html";i:1545464819;s:130:"E:\xampp-windows-x64-5.6.40-1-VC11-installerroot\rootdir\htdocs\protects\www.opendemo.devp\application\man\view\public\header.html";i:1545464836;s:130:"E:\xampp-windows-x64-5.6.40-1-VC11-installerroot\rootdir\htdocs\protects\www.opendemo.devp\application\man\view\public\footer.html";i:1545464836;}*/ ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>后台管理</title>
<script src="http://cdn.bootcss.com/jquery/2.1.0-beta3/jquery.min.js"></script>
<link rel="stylesheet" href="/static/layui/css/layui.css">
<link rel="stylesheet" href="/static/css/admin.css">
<script src="/static/layui/layui.js"></script>
</head>
<body>
<div class="layui-layout layui-layout-admin">
   <div class="layui-header header header-admin">
  	<div class="layui-main">
	 </div>
  </div>

  <div id="sidebar-side" class="layui-side layui-bg-black">
        <div id="admin-navbar-side" class="layui-side-scroll" lay-filter="side">
          <ul class="layui-nav layui-nav-tree site-demo-nav">
          <li class="layui-nav-item layui-nav-itemed">
          <a class="javascript:;" href="javascript:;">网站设置</a>
          <dl class="layui-nav-child">
            <dd>
              <a href="<?php echo url('man/config/index'); ?>">全局设置</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/config/video'); ?>">导流设置</a>
            </dd>
             <dd>
              <a href="<?php echo url('man/lead/txt'); ?>">文字链导量列表</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/config/listFile'); ?>">公众号校验文件列表</a>
            </dd>
          </dl>
        </li>
        <li class="layui-nav-item layui-nav-itemed">
          <a class="javascript:;" href="javascript:;">第三方平台</a>
          <dl class="layui-nav-child">
            <dd>
              <a href="<?php echo url('man/auth/index'); ?>">授权列表</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/auth/add'); ?>">添加授权</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/auth/wechat'); ?>">授权公众号列表</a>
            </dd>
          </dl>
        </li>
         
      
      <!--
 <li class="layui-nav-item layui-nav-itemed">
          <a class="javascript:;" href="javascript:;">内容管理</a>
          <dl class="layui-nav-child">
            <dd>
              <a href="<?php echo url('man/zb/dlist'); ?>">内容列表</a>
            </dd>
          </dl>
        </li>
        <li class="layui-nav-item layui-nav-itemed">
          <a class="javascript:;" href="javascript:;">【爱测测】广告管理</a>
          <dl class="layui-nav-child">
            <dd>
              <a href="<?php echo url('man/ad/pic'); ?>">图片广告</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/ad/txt'); ?>">文字广告</a>
            </dd>
          </dl>
        </li>
 <li class="layui-nav-item layui-nav-itemed">
          <a class="javascript:;" href="javascript:;">【装逼】内容管理</a>
          <dl class="layui-nav-child">
            <dd>
              <a href="<?php echo url('man/zb/dlist'); ?>">内容列表</a>
            </dd>
          </dl>
        </li>
   <li class="layui-nav-item layui-nav-itemed">
          <a class="javascript:;" href="javascript:;">内容管理</a>
          <dl class="layui-nav-child">
            <dd>
              <a href="<?php echo url('man/zb/dlist'); ?>">内容列表</a>
            </dd>
          </dl>
        </li>     
        <li class="layui-nav-item layui-nav-itemed">
          <a class="javascript:;" href="javascript:;">【爱测测】内容管理</a>
          <dl class="layui-nav-child">
            <dd>
              <a href="<?php echo url('man/article/category'); ?>">分类管理</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/article/index'); ?>">题目管理</a>
            </dd>
          </dl>
        </li>
        <li class="layui-nav-item layui-nav-itemed">
          <a class="javascript:;" href="javascript:;">【爱测测】域名管理</a>
          <dl class="layui-nav-child">
            <dd>
              <a href="<?php echo url('man/domain/dlist','did=1'); ?>">到达列表</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/domain/add','did=1'); ?>">添加到达</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/domain/dlist','did=2'); ?>">跳转列表</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/domain/add','did=2'); ?>">添加跳转</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/domain/dlist','did=3'); ?>">对接列表</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/domain/add','did=3'); ?>">添加对接</a>
            </dd>
          </dl>
        </li>
       
        <li class="layui-nav-item layui-nav-itemed">
          <a class="javascript:;" href="javascript:;">【装逼】域名管理</a>
          <dl class="layui-nav-child">
             <dd>
              <a href="<?php echo url('man/jump/dlist'); ?>">跳转列表</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/jump/add'); ?>">添加跳转</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/arrive/dlist'); ?>">到达列表</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/arrive/add'); ?>">添加到达</a>
            </dd>
          </dl>
        </li>-->
       <!--  <li class="layui-nav-item layui-nav-itemed">
          <a class="javascript:;" href="javascript:;">【第三方】域名管理</a>
          <dl class="layui-nav-child">
            <dd>
              <a href="<?php echo url('man/party/dlist'); ?>">到达列表</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/party/add'); ?>">添加到达</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/jumps/dlist'); ?>">跳转列表</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/jumps/add'); ?>">添加跳转</a>
            </dd>
          </dl>
        </li> -->
      <!-- <li class="layui-nav-item layui-nav-itemed">
          <a class="javascript:;" href="javascript:;">【视频】域名管理</a>
          <dl class="layui-nav-child">
            <dd>
              <a href="<?php echo url('man/reach/dlist'); ?>">到达列表</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/reach/add'); ?>">添加到达</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/gotos/dlist'); ?>">备份列表</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/gotos/add'); ?>">添加备份</a>
            </dd> -->
           <!--  <dd>
              <a href="<?php echo url('man/vendor/dlist'); ?>">对接列表</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/vendor/add'); ?>">添加对接</a>
            </dd>
             <dd>
              <a href="<?php echo url('man/share/dlist'); ?>">分享链接</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/share/add'); ?>">添加分享</a>
            </dd> -->
             <!--  </dl>
        </li>  -->
       <li class="layui-nav-item layui-nav-itemed">
          <a class="javascript:;" href="javascript:;">广告域名管理</a>
          <dl class="layui-nav-child">
             <dd>
              <a href="<?php echo url('man/domain/dlist','did=6'); ?>">广告域名列表</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/domain/add','did=6'); ?>">添加广告域名</a>
            </dd>
          </dl>
        </li>
        
        <li class="layui-nav-item layui-nav-itemed">
          <a class="javascript:;" href="javascript:;">公众号对接-域名管理</a>
          <dl class="layui-nav-child">
           <dd>
              <a href="<?php echo url('man/jump/dlist'); ?>">视频跳转列表</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/jump/add'); ?>">添加跳转</a>
            </dd>
             <dd>
              <a href="<?php echo url('man/arrive/dlist'); ?>">视频到达列表</a>
            </dd>
            <dd>
              <a href="<?php echo url('man/arrive/add'); ?>">添加到达</a>
            </dd>
            <dd>
            <a href="<?php echo url('man/vendor/dlist'); ?>">对接列表</a>
          </dd>
          <dd>
            <a href="<?php echo url('man/vendor/add'); ?>">添加对接</a>
          </dd>
          </dl>
        </li>
        
        </div>
  </div>

  <script>
	layui.use('element', function(){
	  var element = layui.element(); //导航的hover效果、二级菜单等功能，需要依赖element模块
	  
	  //监听导航点击
	  element.on('nav(demo)', function(elem){
	    //console.log(elem)
	    layer.msg(elem.text());
	  });
	});
</script>
 <div class="layui-body">
	<div class="aright">
	<div class="arz cl"><a href="<?php echo url('man/domain/add',['did'=>"$type"]); ?>"><i class="layui-icon">&#xe608;</i>添加域名</a></div>
	<form method="post" class="aform cl" >
	<table width="100%">
	      <tr>

			<th width="5%" align="center">ID编号<?php echo $type; ?></th>
	        <th width="15%" align="center">域名名称</th>
	        <th width="8%" align="center">域名状态</th>
			<th width="9%" align="center">开始时间</th>
			<th width="9%" align="center">结束时间</th>
	        <th width="9%" align="center">基本操作</th>
	      </tr>
	      <?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
		  <tr>
			<td align="center"><?php echo $vo['id']; ?></td>
	        <td align="center"><?php echo $vo['domain']; ?></td>
			<td align="center">
				<?php if($vo['status'] == 1): ?>
				<span style="color:#00f;">未使用</span>
				<?php elseif($vo['status'] == 2): ?>
				<span style="color:#0f0;">正在运行</span>
				<?php elseif($vo['status'] == 3): ?>
				<span style="color:#f00;">黑名单</span>
				<?php endif; ?>
			<td align="center"><?php echo $vo['start_time']; ?></td>
			<td align="center"><?php echo $vo['end_time']; ?></td>
	        <td align="center">
	        	<?php if($vo['status'] == 1): ?>
	        	<a  onclick="change(<?php echo $vo['id']; ?>,<?php echo $type; ?>,2)">启用</a> | <a  onclick="change(<?php echo $vo['id']; ?>,<?php echo $type; ?>,3)">设为黑名单</a>
				<?php elseif($vo['status'] == 2): ?>
				<a  onclick="change(<?php echo $vo['id']; ?>,<?php echo $type; ?>,1)">设为未使用</a> | <a  onclick="change(<?php echo $vo['id']; ?>,<?php echo $type; ?>,3)">设为黑名单</a>
				<?php elseif($vo['status'] == 3): ?>
				<a  onclick="change(<?php echo $vo['id']; ?>,<?php echo $type; ?>,1)">设为未使用</a> | <a  onclick="change(<?php echo $vo['id']; ?>,<?php echo $type; ?>,2)">启用</a>
				<?php endif; ?>
	        	| <a href="<?php echo url('domain/delete',array('aid'=>$vo['id'],'type'=>$type)); ?>" onclick="return confirm('您确定要删除吗？');">删除</a>
	        </td>
	      </tr>
	      <?php endforeach; endif; else: echo "" ;endif; ?>
	 </table>

	 </form>
	 		<div class="pages">
 				<?php echo $list->render(); ?>
	 	 	</div>
	</div>
	</div>
</div>
<script>
layui.use('layer',function(){
	var layer = layui.layer;
})

$("input[name=bek]").blur(function(){
	var bek = $(this).val();
	var nid=$(this).attr('data-id');
	$.post("<?php echo url('man/domain/cblur'); ?>",{'aid':nid,'bek':bek},function(data){
		if(data){
			layer.msg("修改成功");
			setTimeout(function(){
				window.location.reload();
			},1000);
			
		}
	})
	 
})
function change(aid,type,status){
	$.post("<?php echo url('man/domain/change'); ?>",{'aid':aid,'type':type,'status':status},function(data){
		if(data){
			layer.msg("修改成功");
			setTimeout(function(){
				window.location.reload();
			},1000);
			
		}
	})
}

</script>
<div class="layui-footer">
    <!-- 底部固定区域 -->
  </div>
</div>

</body>
</html>
